<template>
  <view class="container">
    <s-nav-bar />
    <scroll-view scroll-y class="container-main" flex flex-col>
      <view style="margin-bottom: 50upx"> 获取的数据：{{ text }} </view>
      <uv-button
        type="primary"
        text="触发请求"
        @click="handleRequest()"
      ></uv-button>
    </scroll-view>
  </view>
</template>

<script setup>
import { ref } from "vue";
import { testGet } from "@/api";

let text = ref("");
const handleRequest = () => {
  testGet().then((res) => {
    text.value = res.data.content;
  });
};
</script>

<style lang="scss" scoped></style>
